#include <asm.h>
#include <regdef.h>
#include <new_inst_test.h>

LEAF(my7_msubu_test)
    .set noreorder
    addiu s0, s0 ,1
    addiu s2, zero, 0x0
    lui   t2, 0x1
###test inst

    LI (t0,0x2222);
    LI (t1,0x3333);
    mtlo t0;
    mthi t1;
    LI (t2,0x4444);
    LI (t3,0x5555);
    msubu t0,t1;
    msubu t1,t2;
    msubu t2,t3;

    TEST_MType(0x26020297,0x5dfeb2fe,0xc0e5acc1,0x410ba4b6,0x49833c93,0x4f003039,msubu)
    TEST_MType(0xc95170ff,0xd6f0109f,0x94a41b75,0xd01e9715,0xce5939d6,0xd8e3f359,msubu)
    TEST_MType(0x087b2256,0x22ccdd0b,0x278b84d3,0xc60ac96d,0x9a023c85,0xc731ed6f,msubu)
    TEST_MType(0x1b9d208f,0xd2c1ae28,0x6dd5d378,0x2953b976,0x64531bd0,0x247261db,msubu)
    TEST_MType(0x823a5fca,0x74db9b78,0x872b93c5,0xd861ee10,0x6455c875,0x9ef87d06,msubu)
    TEST_MType(0x11727559,0x4d5872ee,0x4fe467c1,0x73b89fb2,0x9c27227f,0x78fe142c,msubu)
    TEST_MType(0x17456395,0xb42954d8,0x4300b121,0x3b4dd638,0x61169ad9,0x3468fe7b,msubu)
    TEST_MType(0x24f28fce,0xca9f5f4f,0x8e95f1c6,0xf4195fe7,0xd5bfc458,0xec6535fb,msubu)
    TEST_MType(0x5c441766,0x6f4eb8a8,0xdb1923e2,0x338051de,0xb3adced2,0x5b9e3751,msubu)
    TEST_MType(0xa5925202,0x20dde20b,0xc801dfc0,0x3636a19e,0x1d6b29d6,0x2a9a8b57,msubu)
    TEST_MType(0x35a6e76e,0xce0c4b84,0x8e116581,0x1de9433e,0x7b15f439,0x13713db1,msubu)
    TEST_MType(0xb7fbfcb6,0x294e2fa6,0x6c6598ea,0x25e8bdf8,0x22a4e0ee,0x1a4a1ad1,msubu)
    TEST_MType(0x455f5f29,0x3f82d830,0xc2128134,0x7f53dbb1,0xa610f0e4,0x9089c921,msubu)
    TEST_MType(0xbbe8463e,0x8d5cb767,0xccdd5bed,0xf7b571df,0xd5cff0df,0x16337103,msubu)
    TEST_MType(0x13af0a70,0x769478d7,0x93d5e37a,0x25af6963,0xd17c278a,0x2ecd82b0,msubu)
    TEST_MType(0xad286b16,0x68cc1ab4,0xf431248a,0x964f0f1b,0x1504ac02,0x74656e2e,msubu)
    TEST_MType(0xf350f701,0x6c159b82,0x0b494c5e,0xea6014a7,0x4f0955e0,0xe5052acb,msubu)
    TEST_MType(0x942014b5,0x8b5c0cc6,0x0b4f8e43,0x44c0644d,0xd5240e41,0x75e6f0fc,msubu)
    TEST_MType(0x52fe89bd,0xb2b00528,0x7d18a91c,0xa1063f57,0x897edfa4,0x87f5c20b,msubu)
    TEST_MType(0x54392fdf,0x3ed52b1f,0xbf6a4d2d,0x2ef5ebaf,0x63ec8e2e,0x43a1e70c,msubu)
    TEST_MType(0x98dd2054,0xa8c650b8,0xf141d890,0x26292dc9,0x0b4354f0,0x494d452f,msubu)
    TEST_MType(0x7fd2a24c,0x0d333aa8,0xeb13a979,0x62a249bb,0xb7376359,0x6939903a,msubu)
    TEST_MType(0x906a6a89,0x1d498899,0x0f158385,0x3c336a3a,0xcd58f766,0x2f6f6b1a,msubu)
    TEST_MType(0x762a1f37,0x701e145a,0x50cf8b23,0x16f1f496,0xde80d079,0x4ab24493,msubu)
    TEST_MType(0x63777df5,0x3ece44bf,0x471d79dc,0x4d76fdc1,0xebdf87a7,0x65de1320,msubu)
    TEST_MType(0xb9f33da8,0x3ea1aeb0,0xe809f314,0xe686cf7f,0x89d48694,0xd5637a9c,msubu)
    TEST_MType(0x5e64c9fc,0xb4283b49,0x788f27af,0x040b0b4b,0x5d39d48b,0xe813f4f0,msubu)
    TEST_MType(0x967439f5,0xd2855ed8,0x86283e19,0xd992da5d,0x3bca1ad1,0xec52fb3b,msubu)
    TEST_MType(0xe5e7266a,0x0dfc6bab,0xf9c9dca5,0x43996b10,0x5a96d373,0x422c6c94,msubu)
    TEST_MType(0x9914336c,0xd0870b36,0x223cdd66,0xaa11bf9b,0x28a95a2e,0xbd27ab1c,msubu)
    TEST_MType(0xde0477d4,0xe7e6093f,0x4a2f5841,0xaa33a870,0x09f7496d,0xad66af86,msubu)
    TEST_MType(0xc7efdec5,0x8171faf6,0x7e3f640f,0xd12d20c6,0x7840d75d,0xece42b2e,msubu)
    TEST_MType(0x64b65354,0x409302e3,0x577eb53b,0x468951e8,0xeb0d40b7,0x5ff0bc92,msubu)
    TEST_MType(0xfc727544,0x58f5d1dd,0x9be114c1,0xcdf707fa,0x9680d475,0xccbaf6eb,msubu)
    TEST_MType(0xd581bfa2,0x0ab01070,0xec7d0779,0x29bec14d,0x849afe59,0x27f89944,msubu)
    TEST_MType(0xa2a2ad73,0xd8b0a111,0x644b803f,0x89b1fb22,0xc73e57e2,0x98082522,msubu)
    TEST_MType(0xa47c8bc1,0xa33addc7,0x3d1a0d33,0x72818a70,0x2b4a4d3a,0x93ab409b,msubu)
    TEST_MType(0x4c1f9027,0x5b0ebce1,0x8c5c61be,0x2605d549,0x6118b805,0x41196f6b,msubu)
    TEST_MType(0x59b2c5cd,0x400c822e,0x6abf7a65,0xe1020236,0xd6ed1f3b,0xf77315a8,msubu)
    TEST_MType(0x0e8bb9c1,0x5c0e5d3d,0xabf31d0c,0x5f8a559f,0x6a477d09,0x64c55d51,msubu)
    TEST_MType(0x936eea23,0x364124d1,0xb2e34bc2,0xd04f0002,0x7e405e55,0xb94cc4f2,msubu)
    TEST_MType(0x67e0757a,0x7ffeaa2f,0x9aa5acb4,0x77802a13,0xcfea421a,0xab6fda1e,msubu)
    TEST_MType(0xf31e668b,0x5ee04b29,0xe1189e40,0xc86171fa,0x7ca1c383,0xc39b5273,msubu)
    TEST_MType(0xe8b68138,0xad8520dd,0xf3ba2fc2,0x3fdb352b,0xa386bd1a,0x475bed1b,msubu)
    TEST_MType(0x87354402,0x60e5bbdb,0xf72a526d,0x6f23754b,0x2032f623,0x416b08cf,msubu)
    TEST_MType(0x495aeed8,0x510c991c,0x14acfbc7,0xebffcebe,0xfd7e3367,0x03393073,msubu)
    TEST_MType(0xc5c698f1,0xbaa81fb6,0x29a8c6c7,0x3243328a,0x4986b11d,0x4208a7d6,msubu)
    TEST_MType(0x1a2f98a2,0x9d9ed449,0x44478e61,0x49c35d3a,0xb43c3c93,0x3fb3344b,msubu)
    TEST_MType(0xd8a5d541,0xc4666642,0x9e93064d,0xa7360f20,0x4831e70f,0xb05f7380,msubu)
    TEST_MType(0xc191aa74,0xf5027d59,0xf4ef3511,0xacfe558b,0xb9b61b65,0xafac77cb,msubu)

    TEST_MType(0x9f156635,0x00000000,0xbf909417,0xff5db111,0xbf909417,0xff5db112,msubu)
    TEST_MType(0xed7ddd46,0x00000000,0x31a374d8,0xcedfc44c,0x31a374d8,0xcedfc44c,msubu)
    TEST_MType(0xd8af22ef,0x00000000,0x7eee45bf,0xf544be74,0x7eee45bf,0xf544be74,msubu)
    TEST_MType(0xe28d641f,0x00000000,0xbd297f04,0x7484ca6a,0xbd297f04,0x7484ca6b,msubu)
    TEST_MType(0xecbd7495,0x00000000,0x43437b21,0xfaa6b29b,0x43437b21,0xfaa6b29b,msubu)
    TEST_MType(0x5578cfe0,0x00000000,0xdf43bbff,0xf9b00d03,0xdf43bbff,0xf9b00d04,msubu)
    TEST_MType(0x865bf02e,0x00000000,0xecd5267e,0x4dc0b74f,0xecd5267e,0x4dc0b750,msubu)
    TEST_MType(0x2efaea86,0x00000000,0x52e7876f,0x8b17505e,0x52e7876f,0x8b17505e,msubu)
    TEST_MType(0xd8849541,0x00000000,0xe3efea9a,0x5ac02cf9,0xe3efea9a,0x5ac02cfa,msubu)
    TEST_MType(0xbb8e065b,0x00000000,0x36d2086e,0x01f74aa6,0x36d2086e,0x01f74aa6,msubu)
    TEST_MType(0xc9712469,0x00000000,0x7ffaabd7,0xe8a99a2a,0x7ffaabd7,0xe8a99a2a,msubu)
    TEST_MType(0xbef23c7f,0x00000000,0x69d1054d,0xa09bcf56,0x69d1054d,0xa09bcf56,msubu)
    TEST_MType(0xe10d4d40,0x00000000,0xcc4bac73,0x31a110ae,0xcc4bac73,0x31a110af,msubu)
    TEST_MType(0xa22f17eb,0x00000000,0xbf2b090b,0x57f73425,0xbf2b090b,0x57f73426,msubu)
    TEST_MType(0x44c549d4,0x00000000,0xed2a5d5b,0x1a773038,0xed2a5d5b,0x1a773039,msubu)
    TEST_MType(0x44c2f645,0x00000000,0xee849923,0x6efe23c8,0xee849923,0x6efe23c9,msubu)
    TEST_MType(0x29ced8a3,0x00000000,0x07a3b643,0x571f91b8,0x07a3b643,0x571f91b8,msubu)
    TEST_MType(0x124d77da,0x00000000,0xeb475377,0xb47061bf,0xeb475377,0xb47061c0,msubu)
    TEST_MType(0xb4858d37,0x00000000,0x6c7097be,0xf20718e0,0x6c7097be,0xf20718e0,msubu)
    TEST_MType(0x1b1b9d18,0x00000000,0x76e30455,0x228f12a8,0x76e30455,0x228f12a8,msubu)
    TEST_MType(0xff5b236a,0x00000000,0xd8322b61,0xaec21f79,0xd8322b61,0xaec21f7a,msubu)
    TEST_MType(0x0ba8b2e3,0x00000000,0xb22ffba0,0x1189ce62,0xb22ffba0,0x1189ce63,msubu)
    TEST_MType(0x523b1e80,0x00000000,0xbd0a1bd1,0x62db68ba,0xbd0a1bd1,0x62db68bb,msubu)
    TEST_MType(0x575e7888,0x00000000,0xf7ef394b,0xb44351f5,0xf7ef394b,0xb44351f6,msubu)
    TEST_MType(0x3fc9abce,0x00000000,0xdbda0712,0x676a1361,0xdbda0712,0x676a1362,msubu)
    TEST_MType(0xadb78a52,0x00000000,0x4a4b1769,0xf70256ce,0x4a4b1769,0xf70256ce,msubu)
    TEST_MType(0x00000000,0x05d62199,0xc49332ae,0x0838e459,0xc49332ae,0x0838e45a,msubu)
    TEST_MType(0x00000000,0x182f97b2,0xa67b17ed,0x0ed4b4fc,0xa67b17ed,0x0ed4b4fd,msubu)
    TEST_MType(0x00000000,0xf2165655,0x5fa5ed20,0xfab155ac,0x5fa5ed20,0xfab155ac,msubu)
    TEST_MType(0x00000000,0xe9644517,0x3b696414,0x9b7614a2,0x3b696414,0x9b7614a2,msubu)
    TEST_MType(0x00000000,0x000c52bf,0xacee68b5,0x249ba975,0xacee68b5,0x249ba976,msubu)
    TEST_MType(0x00000000,0x28737e50,0x20b786e5,0x9ece2561,0x20b786e5,0x9ece2561,msubu)
    TEST_MType(0x00000000,0x2579208c,0x9b90bea9,0x39c5530c,0x9b90bea9,0x39c5530d,msubu)
    TEST_MType(0x00000000,0x7f875f65,0x6ffa7211,0xc5f7c7b7,0x6ffa7211,0xc5f7c7b7,msubu)
    TEST_MType(0x00000000,0xdef46903,0xbda63dde,0x5b3d1678,0xbda63dde,0x5b3d1679,msubu)
    TEST_MType(0x00000000,0x94682dd2,0x3af8c817,0x8bd0a03c,0x3af8c817,0x8bd0a03c,msubu)
    TEST_MType(0x00000000,0xd9942297,0x44704b31,0x92d5c8e8,0x44704b31,0x92d5c8e8,msubu)
    TEST_MType(0x00000000,0x0497850b,0xaf3d1ebf,0x0b594e5c,0xaf3d1ebf,0x0b594e5d,msubu)
    TEST_MType(0x00000000,0x40b72801,0x720c25cf,0x9abb9f62,0x720c25cf,0x9abb9f62,msubu)
    TEST_MType(0x00000000,0xe8575012,0x1da5df9a,0xe4830873,0x1da5df9a,0xe4830873,msubu)
    TEST_MType(0x00000000,0x79df8320,0xdde5fa93,0x30c01149,0xdde5fa93,0x30c0114a,msubu)
    TEST_MType(0x00000000,0x7338f45a,0x73f753aa,0x43b26af2,0x73f753aa,0x43b26af2,msubu)
    TEST_MType(0x00000000,0x27b9a686,0x205dd16f,0xee7e0ab3,0x205dd16f,0xee7e0ab3,msubu)
    TEST_MType(0x00000000,0xe55fbff0,0x3502b4ef,0x550b2a3e,0x3502b4ef,0x550b2a3e,msubu)
    TEST_MType(0x00000000,0x44742028,0xca0b9869,0x6ccc55db,0xca0b9869,0x6ccc55dc,msubu)
    TEST_MType(0x00000000,0xd1d215bc,0x5e978cee,0xf4d14887,0x5e978cee,0xf4d14887,msubu)
    TEST_MType(0x00000000,0xd96dfd1e,0x3fe66524,0xa955a1b2,0x3fe66524,0xa955a1b2,msubu)
    TEST_MType(0x00000000,0xe6bf475d,0x2767d5fc,0x8f3b68b3,0x2767d5fc,0x8f3b68b3,msubu)
    TEST_MType(0x00000000,0xc6720b6f,0xd5931718,0x83254fda,0xd5931718,0x83254fdb,msubu)
    TEST_MType(0x00000000,0x8c8433de,0x1ce8efa1,0x917a296d,0x1ce8efa1,0x917a296d,msubu)


###detect exception
    bne s2, zero, inst_error
    nop
###score ++
    addiu s3, s3, 1
###output (s0<<24)|s3
inst_error:
    sll t1, s0, 24
    or t0, t1, s3
    sw t0, 0(s1)
    jr ra
    nop
END(my7_msubu_test)